import BaseComponent from "../../app/baseComponent";

export class AUILoading extends BaseComponent {
    constructor(name) {
        super(name);
        this.props = {
            show: {
                type: Boolean,
                default: false
            }
        };
        this.computed = {
            private_show: function() {
                return this.show;
            }
        };
        this.watch = {

        };
        this.methods = {
         
        };
    }
    _template() {
        var self = this;
return `<div class="${self._name}">
    <div class="${self._name}__cover" :aui-hidden="!private_show"><div class="${self._name}__loader">loading</div></div>
    <slot></slot>
</div>`;
    }
}

AUILoading.install = function () {
    window.AUICustomComponents.define("aui-loading", AUILoading);  
}